<?php
/**
 * Created by PhpStorm.
 * User: chenx
 * Date: 18-3-6
 * Time: 下午5:02
 */

namespace common\models;


use yii\db\ActiveRecord;
use yii\behaviors\TimestampBehavior;
class GoodsAttr extends ActiveRecord
{
    public static function tableName()
    {
        return 'goods_attr';
    }



    public function rules()
    {
        return [
            [['image','attribute_value_id'],'string'],
            [['goods_id','inventory','is_del','create_time','update_time'],'integer'],
            [['original_price','discount_price'],'double']
        ];

    }

    public function attributeLabels()
    {
        return [
            'id	'=> 'id',
            'goods_id'=> '商品ID',
            'original_price'=> '原价',
            'discount_price'=>'折后价',
            'inventory	'=> '库存',
            'image	'=> '图片',
            'attribute_value_id	'=> '属性1',
            'is_del'=>'是否删除',
            'create_time	'=> '创建时间',
            'update_time'=>'修改时间',
        ];
    }


}